﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyLinkerSDK.Enum
{
    public enum MessageErrorType
    {
        /// <summary>
        /// 成功
        /// </summary>
        SUCCESS = 0,

        /// <summary>
        /// 消息结构错误
        /// </summary>
        MESSAGE_BODY_ERROR = 100000,

        /// <summary>
        /// 格式错误 incorrect_format
        /// </summary>
        INCORRECT_FORMAT = 100001,

        /// <summary>
        /// 密码错误
        /// </summary>
        PASSWORD_ERROR = 100002,

        /// <summary>
        /// 控制指令不正确 invalidate control order
        /// </summary>
        INVALIDATE_CONTROL_ORDER = 100010,

        /// <summary>
        /// 不正确的电源状态指示
        /// </summary>
        INCORRECT_POWERSTATE = 100011,

        /// <summary>
        /// 服务异常 服务错误原因（方便观察原因） service_error
        /// </summary>
        SERVICE_ERROR = 100020,

        /// <summary>
        /// 设备不支持该操作 device not support
        /// </summary>
        UNSUPPORT_FUNCTION = 100030,

        /// <summary>
        /// 不支持的协议类型
        /// </summary>
        UNSUPPORT_PROTOCOLTYPE = 300031,


        /// <summary>
        /// 请求参数有误 invalidate params
        /// </summary>
        INVALIDATE_PARAMS = 100040,

        /// <summary>
        /// Query action有误
        /// </summary>
        INCORRECT_QUERYACTION = 100041,

        /// <summary>
        /// Data数据不存在
        /// </summary>
        DATA_NOT_EXIST = 100042,

        /// <summary>
        /// 非数值属性值
        /// </summary>
        NON_NUMERIC_VALUES = 100043,

        /// <summary>
        /// 设备未找到 device is not exist
        /// </summary>
        DEVICE_NOT_EXIST = 100050,

        /// <summary>
        /// 设备ID为空 deviceid_is_null
        /// </summary>
        DEVICEID_IS_NULL = 100051,

        /// <summary>
        /// 设备离线状态 device is offline
        /// </summary>
        DEVICE_OFFLINE = 100060,

        /// <summary>
        /// access_token 无效（包括失效） access_token is invalidate
        /// </summary>
        KEY_INVALIDATE = 100070,

        /// <summary>
        /// payload is null
        /// </summary>
        PAYLOD_IS_NULL = 100080,

        /// <summary>
        /// 不支持的action action_not_support
        /// </summary>
        UNSUPPORT_ACTION = 100090,

        /// <summary>
        /// 不支持的协议 protocol_not_support
        /// </summary>
        UNSUPPORT_PROTOCOL = 100100,

        /// <summary>
        /// 不支持的消息类型 messageType  msgtype_not_support
        /// </summary>
        UNSUPPORT_MSGTYPE = 100110,

        /// <summary>
        /// messageId 不能为空 messageid_cannot_null
        /// </summary>
        MESSAGEID_CANNOT_NULL = 100120,

        /// <summary>
        /// 消息中的用户ID和登录用户ID不符合 msguser_not_match_loguser
        /// </summary>
        MSGUSER_NOT_MATCH_LOGUSER = 100130,

        /// <summary>
        /// 消息认证失败 message_validate_failed
        /// </summary>
        MESSAGE_VALIDATE_FAILED = 100131,

        /// <summary>
        /// 请求内容为空 request_body_is_null
        /// </summary>
        REQUEST_BODY_IS_NULL = 100231,

        /// <summary>
        /// 请求内容过长 request_body_too_long
        /// </summary>
        REQUEST_BODY_TOO_LONG = 100232,

        /// <summary>
        /// 请求ContentType错误，只支持json
        /// </summary>
        CONTENTTYPE_ERROR = 100233,

        /// <summary>
        /// 没有电源状态值
        /// </summary>
        NO_POWERSTATE_VALUE = 100301,

        /// <summary>
        /// 方向值有误
        /// </summary>
        DIRECTION_VALUE_ERROR = 100302,


        /// <summary>
        /// MQTT服务没有启动
        /// </SUMMARY>
        MQTTSERVICE_NOT_START = 301002,

        /// <SUMMARY>
        /// 客户端TCP服务没有启动
        /// </SUMMARY>
        CLIENTTCPSERVICE_NOT_START = 301003,

        /// <SUMMARY>
        /// 客户端UDP服务没有启动
        /// </SUMMARY>
        CLIENTUDPSERVICE_NOT_START = 301004,

        /// <SUMMARY>
        /// 客户端HTTP服务没有启动
        /// </SUMMARY>
        CLIENTHTTPSERVICE_NOT_START = 301005,

        /// <SUMMARY>
        /// APP服务没有启动
        /// </SUMMARY>
        APPSERVICE_NOT_START = 301006,

        /// <SUMMARY>
        /// WEB服务没有启动
        /// </SUMMARY>
        WEBSERVICE_NOT_START = 301007,

        /// <summary>
        /// 服务已经关闭
        /// </summary>
        SERVICE_CLOSED = 300021,


        /// <summary>
        /// 设备不支持该操作 device not support
        /// </summary>
        NOT_SUPPORT_FUNCTION = 300030,

        /// <summary>
        /// 不支持的协议类型
        /// </summary>
        NOT_SUPPORT_PROTOCOLTYPE = 300031,

        /// <summary>
        /// 请求超时
        /// </summary>
        DEVICEID_RESPONSE_TIMEOUT = 300052,

        /// <summary>
        /// 请求错误
        /// </summary>
        DEVICEID_REQUEST_ERROR = 300053,

        /// <summary>
        /// 设备返回的数据错误
        /// </summary>
        DEVICEID_RESPONSE_ERROR = 300054,

        /// <summary>
        /// Topic不支持
        /// </summary>
        TOPIC_NOT_MATCH = 300081,

        /// <summary>
        /// 不支持的action action_not_support
        /// </summary>
        ACTION_NOT_SUPPORT = 300090,

        /// <summary>
        /// 不支持的协议 protocol_not_support
        /// </summary>
        PROTOCOL_NOT_SUPPORT = 300100,

        /// <summary>
        /// 不支持的消息类型 messageType  msgtype_not_support
        /// </summary>
        MSGTYPE_NOT_SUPPORT = 300110,

        /// <summary>
        /// 只支持本地请求
        /// </summary>
        ONLY_SUPPORT_LOCALHOST = 300240,

        /// <summary>
        /// Token验证失败
        /// </summary>
        TOKEN_VALIDATE_FAILED = 300234,

        /// <summary>
        /// 控制失败
        /// </summary>
        CONTROL_FAILED = 300241,

        /// <summary>
        /// 查询失败
        /// </summary>
        QUERY_FAILED = 300242,
    }
}
